﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DevExpress.Xpo;

namespace WROA.Models.Entitys
{
    /// <summary>
    /// 流程步骤表
    /// </summary>
    public class Procedure : XPObject
    {
        private Flow flow;
        [Association("FlowProcedure")]
        public Flow Flow
        {
            get { return flow; }
            set { flow = value; }
        }
        
        private int step_id; 
        [DbType("int")]
        public int Step_id { get; set; }

        
        private string pr_name;
        [DbType("nvarchar(50)")]
        public string Pr_name { get; set; }

        
        private string pr_remark;
        [DbType("ntext")]
        public string Pr_remark { get; set; }

        
        private string pr_type;  //审批类型（按职位or按人员）
        [DbType("nvarchar(50)")]
        public string Pr_type { get; set; }

        
        private string pr_typevalue; //审批类型值
        [DbType("nvarchar(50)")]
        public string Pr_typevalue { get; set; }

        
        private bool pr_isfinished;    //是否是最后一个步骤
        [DbType("bit")]
        public bool Pr_isfinished { get; set; }

        [Association("ApplyDocumentProcedure", typeof(ApplyDocument))]
        public XPCollection applydocuments
        {
            get
            {
                return GetCollection("applydocuments");
            }
        }

        [Association("ApplyMeetingProcedure", typeof(ApplyMeeting))]
        public XPCollection applymeetings
        {
            get
            {
                return GetCollection("applymeetings");
            }
        }

        [Association("ApplyCarProcedure", typeof(ApplyCar))]
        public XPCollection applycars
        {
            get
            {
                return GetCollection("applycars");
            }
        }
    }
}